SHADBX Control
SHADBX.VBX Custom Control

Description

The SHADBX Control adds a new technique of providing help to the user. This control allows the developer to provide the user with a dynamic popup help window for advisory information, error reporting, or expansion and elaboration on of a user action.

The SHADBX.VBX custom control closely approximates the actions obtained by Window's help engine. You can now add this feature to VB applications.

File Name

SHADBX.VBX

Remarks

When you create and distribute applications that use the SHADBX control you should install the file SHADBX.VBX in the customer's Microsoft Windows \SYSTEM sub directory. All of the properties, events, and methods for this control are listed below.  Properties and events that apply only to this control, or require special considerations when used with it, are underlined.  They are documented in this help file.  See the Visual Basic Language Reference or on-line Help for documentation of the remaining properties, events, and methods.

Properties

Action

BackColor

CtlName

ForeColor

FontBold

FontName

FontSize

Index

Left

MaxWidth

MessageText

Top

Tag

WindowLeft

WindowPosition

WindowTop

Events

ClearNotify

Methods

To popup a Shadow box window, set the MessageText property to the desired string, and the window with the text appears on-screen. The popup window is removed by a mouse click or any key press action by the user.

The Action property acts a method for removing the shadow box from the screen by program control.

Tips and Techniques


ClearNotify Event, SHADBX Control

Description

The ClearNotify() event is generated when an active shadow box is removed from the screen. It is a notification event and has no properties. Typical usage would be to clear a flag in the Visual Basic application which is used as a signal in the Visual Basic application that a shadow box is on screen. This signal flag can then be used to inhibit actions which may interfere with the on screen shadow box.

Syntax

Sub ShadowBox1_ClearNotify ()


Tips and Tecniques
Tips and Techniques

1. Have Fun:

Your users may appreciate the new feature and you may have to add it to all your VISUAL BASIC applications. Fortunately it is very easy to use the SHADBX.VBX control.

2. Setting Colors:

It is important to note that you must explicitly set the BackColor and the ForeColor for each SHADBX.VBX control used in a project. VISUAL BASIC does not have defaults for palette aware controls.


Action Property, Shadbx Control

Description

Removes the Shadbx window from the screen under program control.

Normally the user would remove the Shadbx from the screen with a mouse click or keyboard action. This property is provided to give the programmer some flexibility to use "timed display" of a Shadbx window as desired.

Usage

[form.]SHADBX.Action[ = setting %]

Settings

The Action property settings are:

Setting	Description

ID_STOP      = 41	Stop a Shadbx help session.

Data Type

Integer.


WindowTop Property, Shadbx Control

Description

Sets the Shadbx window's top location. The value is set in pixels relative to the form which the SHADBX.VBX control is placed on. The top left coordinates of the form are defined as 0,0.

If the SHADBX.VBX control's "WindowPosition" property is set to FALSE, this property has no effect.

Usage

[form.]SHADBX.WindowTop[ = setting %]

Data Type

Integer.


WindowLeft Property, Shadbx Control

Description

Sets the Shadbx window's left location. The value is set in pixels relative to the form which the SHADBX.VBX control is placed on. The top left coordinates of the form are defined as 0,0.

If the SHADBX.VBX control's "WindowPosition" property is set to FALSE, this property has no effect.

Usage

[form.]SHADBX.WindowLeft[ = setting %]

Data Type

Integer.


WindowPosition Property, Shadbx Control

Description

Setting this property determines where the Shadbx will display on screen. Setting the property to FALSE will display the Shadbx using the control's internal default positioning values. Setting this property to TRUE will display the Shadbx using the coordinates supplied in the WindowTop and WindowLeft properties. The coordinate values are in pixels relative to the top left corner of the form which the SHADBX.VBX control is placed. Form top left is defined as 0,0.

Limited control of the width of the Shadbx window can be had by using carriage return line feed characters in the messageText property sent to the control. The width will be set within limits defined as 200 pixels minimum to 400 pixels maximum.

If this property is set TRUE, the programmer assumes all responsibility for setting the Shadbx window. The property value can be dynamically changed.

Usage

[form.]SHADBX.WindowPosition[ = setting %]

Data Type

Boolean.


MaxWidth Property, Shadbx Control

Description

Sets the maximum width of the popup text box.

The minimum text box width is set at 40 screen pixels. If MaxWidth is less than 40, the width is set to 40 pixels.

Text box width can also be varied between the minimum and maximum values by controlling the placement of carriage return line feed characters in the message text. If the width is controlled by the MaxWidth parameter, do not use carriage return line feeds in the message text.

Usage

[form.]SHADBX.MaxWidth[ = setting %]

Data Type

Integer.

Value represents screen pixels.


MessageText Property, Shadbx Control

Description

Sets the text to be displayed in the popup window.

Usage

[form.]SHADBX.hwndForm[ = setting %]

Data Type

String, maximum of 1023 characters.


BackColor Property, SHADBX Control

Description

The background color of the popup window is set by the color palette attached to the control's BackColor property.

The BackColor must be explicitly set to a color; the default is not pre-set when the control is loaded.

Each SHADBX.VBX control in a project may have different BackColor properties set.

Usage

[form.]SHADBX.BackColor[ = setting %]

Settings

The BackColor property is a color palette used to choose the popup window's background color. Select the desired color with the mouse, or type in an unsigned long color value.

Data Type

Unsigned long color value. For SDK users, ForeColor uses the same format as the WINDOWS.H COLORREF parameter.


ForeColor Property, SHADBX Control

Description

The text color of the popup window is set by the color palette attached to the control's ForeColor property.

The ForeColor must be explicitly set to a color; the default is not pre-set when the control is loaded.

Each SHADBX.VBX control in a project may have different ForeColor properties set.

Usage

[form.]SHADBX.ForeColor[ = setting %]

Settings

The ForeColor property is a color palette used to choose the popup window's text color. Select the desired color with the mouse, or type in an unsigned long color (i.e., COLORREF) value.

Data Type

Unsigned long color value. For SDK users, ForeColor uses the same format as the WINDOWS.H COLORREF parameter.


FontBold Property, SHADBX Control

Description

The FontBold property is the bold attribute of the text displayed in the popup SHADBX window. It is set by a standard VB FontBold pick list in the properties window.

The FontBold must be explicitly set to a value; the default is not pre-set when the control is loaded.

Each SHADBX.VBX control in a project may have different FontBold property set. The FontBold property may be dynamically changed at runtime by following the normal VB coding rules for setting this parameter.

Usage

[form.]SHADBX.FontBold [ = setting %]

Settings

The FontBold property is the text font bold attribute selection set by a standard VB FontBold pick list in the properties window

Data Type

The values used correspond to the standard VB FontBold parameters used in the standard VB controls.


FontName Property, SHADBX Control

Description

The FontName property is the font name of the text displayed in the popup SHADBX window. It is set by a standard VB FontName pick list in the properties window.

The FontName must be explicitly set to a FontName; the default is not pre-set when the control is loaded.

Each SHADBX.VBX control in a project may have different FontName properties set. The FontName property may be dynamically changed at runtime by following the normal VB coding rules for setting this parameter.

Usage

[form.]SHADBX.ForeColor[ = setting %]

Settings

The FontName property is a text font name selection set by a standard VB FontName pick list in the properties window

Data Type

The values used correspond to the standard VB FontName parameters used in the standard VB controls.


FontSize Property, SHADBX Control

Description

The FontSize property is the font size of the text displayed in the popup SHADBX window. It is set by a standard VB FontName pick list in the properties window.

The FontSize property must be explicitly set at design time; the default is not pre-set when the control is loaded.

Each SHADBX.VBX control in a project may have different FontSize properties set.  The FontSize property may be dynamically changed at runtime by following the normal VB coding rules for setting this parameter.

Usage

[form.]SHADBX.FontSize[ = setting %]

Settings

The FontSize property is set using the pick list provided in the VB properties window.

Data Type

The values used correspond to the standard VB FontSize parameters used in the standard VB controls.